package com.tianma.demo.dao;

import com.tianma.demo.model.Product;
import org.apache.ibatis.annotations.Param;

public interface ProductDao {
    /**
     * 获取产品
     * @param id
     * @return
     */
    Product getProduct(Long id);

    /**
     * 扣减库存
     * @param id
     * @param quantity
     * @return
     */
    int decreaseProduct(Long id, int quantity);

}
